<div id="addChecklist">
		<g:form controller="developmentChecklist" action="preview" target="_window" class="columns">
		<fieldset>
			<g:hiddenField id="developmentTask.id" name="developmentTask.id" value="${developmentTaskId }"/>
			<div class="fieldcontain ${hasErrors(bean: assignmentInstance, field: 'checklist', 'error')} required">
				<label for="checklist"> <g:message code="checklist.checklist.label" default="Checklist" /> <span class="required-indicator">*</span></label>
				<g:select from="${edu.uow.devdocs.Checklist.list() }" name="checklist.id" optionKey="id" optionValue="description" noSelection="[null:'']" value="" onchange="window.location='${createLink(controller:'developmentChecklist',action:'addChecklist') }?checklist.id='+this.value+'&developmentTask.id=${developmentTaskInstance?.id }'" />
			</div>
		</fieldset>
			<g:flashMessage/>
			<div id="checklist">
				<table class="sortable">
					<thead>
						<tr>
							<th><g:message code="developmentChecklist.checklist.label" default="Checklist" /></th>
							<th><g:message code="developmentChecklist.status.label" default="Status" /></th>
							<th><g:message code="checklist.description.label" default="Checklist Type" /></th>
							<th>Remove?</th>
							<th>Preview</th>
						</tr>
					</thead>
					<g:each in="${developmentTaskInstance?.developmentChecklists}" status="i" var="checklistItemInList">
						<tr>
							<td><g:remoteLink controller="developmentChecklist" action="getDevelopmentChecklist" update="editChecklist" id="${checklistItemInList?.id}">${fieldValue(bean: checklistItemInList, field: "description")}</g:remoteLink></td>
							<td>${fieldValue(bean: checklistItemInList, field: "status")}</td>
							<td>${fieldValue(bean: checklistItemInList, field: "checklist.description")}</td>
							<td><g:remoteLink controller="developmentChecklist" action="delete" update="addChecklist" id="${checklistItemInList?.id}">delete</g:remoteLink></td>
							<td><g:checkBox name="previewId" value="${checklistItemInList?.id}" /> </td>
						</tr>
					</g:each>
					</table>		
			</div>
				<fieldset class="form-actions">
					<g:actionSubmit class="save" action="preview" value="${message(code: 'default.button.preview.label', default: 'Preview Selected')}" />
				</fieldset>
		</g:form>
	<div id="editChecklist">
	</div>
</div>